package com.cssw.fyzb.core.mao.live;

import com.cssw.fyzb.core.model.mos.UserLiveMo;
import org.bson.types.Decimal128;

import java.math.BigDecimal;

/**
 * @author Feng Chen
 */
public interface UserLiveMao {

    /**
     * 查询直播间听众
     *
     * @param liveId
     * @return
     */
    UserLiveMo findByLiveId(Long liveId);

    /**
     * 创建直播间
     *
     * @param liveId
     */
    void create(Long liveId);

    /**
     * 是否在直播间
     *
     * @param liveId
     * @param userId
     * @return
     */
    boolean exists(Long liveId, Long userId);

    /**
     * 进入直播间
     *
     * @param liveId
     * @param userId
     */
    void enter(Long liveId, Long userId);

    /**
     * 重新进入房间
     *
     * @param liveId
     * @param userId
     */
    void reEnter(Long liveId, Long userId);

    /**
     * 退出直播间
     *
     * @param liveId
     * @param userId
     */
    void exit(Long liveId, Long userId);

    /**
     * 打赏
     *
     * @param liveId
     * @param userId
     * @param reward
     */
    void incReward(Long liveId, Long userId, Integer reward);

    boolean existsGift(Long liveId, Long giftId);

    void incGift(Long liveId, Long giftId);

    void saveGift(Long liveId, Long giftId);
}
